package com.hhkj.admin.bank.model.extend;

import com.hhkj.admin.bank.common.cont.QuestionOrderRuleConst;
import com.hhkj.admin.question.common.cont.QuestionTypeEnum;
import com.ruoyi.common.valid.VAdd;
import com.ruoyi.common.valid.VEdit;
import com.ruoyi.common.valid.emun.EnumListCheck;
import com.ruoyi.common.valid.emun.EnumValueCheck;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.List;

/**
 * QuestionOrderRule
 * 题目排序规则
 *
 * @author ZhengJun
 * @since 2023/5/22 19:06
 */
@Data
public class QuestionOrderRule implements Serializable
{

    /** 排序规则 顺序打乱 disruption 手动排序 manualSortType */
    @NotBlank(message = "排序信息不能为空", groups = {VAdd.class, VEdit.class})
    @EnumValueCheck(
            message = "排序类型编码规则错误 顺序打乱 disruption 手动排序 manualSortType",
            groups = {VAdd.class, VEdit.class},
            target = QuestionOrderRuleConst.Type.class)
    private String typeCode;

    /** 题目题型顺序排序 */
    @EnumListCheck(message = "题目类型编码错误", groups = {VAdd.class, VEdit.class}, target = QuestionTypeEnum.class)
    private List<String> questionTypeCodeList;
}
